package com.jungle.bfi.service.metadata.impl;

import com.jungle.base.domain.bo.BaseUserBo;
import com.jungle.bfi.domain.bo.DatasetItemBo;
import com.jungle.bfi.entity.DatasetItemPo;
import com.jungle.base.service.AbstractService;
import com.jungle.bfi.service.metadata.DatasetItemService;
import org.n3r.idworker.Sid;
import org.springframework.stereotype.Service;

@Service
public class DatasetItemServiceImpl extends AbstractService<DatasetItemPo, DatasetItemBo, String> implements DatasetItemService {

    @Override
    protected String getBoId(DatasetItemBo bo) {
        return bo.getId();
    }

    @Override
    protected String newPoId() {
        return Sid.nextShort();
    }

    @Override
    protected DatasetItemPo createPo(DatasetItemBo bo, BaseUserBo userBo) {
        return mapper.map(bo, DatasetItemPo.class);
    }
}
